import requests

resp = requests.get(url="http://hmshop-test.itheima.net/index.php?m=Home&c=User&a=verify")
cookies=resp.cookies
print(cookies)

# 通过前面的cookie来进行进一步登录
login_url = "http://hmshop-test.itheima.net/index.php?m=Home&c=User&a=do_login"
form_data = {"username": "18210000000", "password": "123456", "verify_code": "8888"}
resp2=requests.post(login_url,data=form_data,cookies=cookies)
print(resp2.status_code)
print(resp2.text)